<include file="Admin/Public/Header" />
<style type="text/css">
    .layui-layer-tips{width:auto !important;}
</style>
<script src="__ADMIN__/js/common.js" type="text/javascript"></script>
<script src="__PUBLIC__/Layer/layer.js" type="text/javascript"></script>
<script src="__PUBLIC__/DatePicker/DatePicker.js" type="text/javascript"></script>
<link href="__PUBLIC__/DatePicker/Css/DatePicker.css" type="text/css" rel="stylesheet" />
<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
    <tr>
        <td height="31"><div class="titlebt">订单结算查询</div></td>
    </tr>
</table>

<div class="main">
    <div class="operate">
        <div class="left_pad">
            <form id="search" method="get" action="{:U('Admin/Finance/SettleAccount')}">
                订单号:<input type="text" name="sn" class="inp_default" value="{$search.sn}" placeholder="请输入订单号"/> 买家:<input type="text" name="buyer_name" class="inp_default" value="{$search.buyer_name}" placeholder="请输入买家用户名"> 卖家:<input type="text" name="seller_name" class="inp_default" value="{$search.seller_name}" placeholder="请输入卖家用户名"><input type="submit" class="btn_blue" value="查  询"><input type="button" onclick="location.href='{:U('Admin/Finance/toExcel')}'" class="btn_blue" value="导出Excel文档" style="float: right;" />
                <input type="hidden" name="cid" id="cid"/>
            </form>
        </div>
    </div>
    <div class="list">
            <table width="100%">
                <tr>
                    <!--<th><input  name="chkall" type="checkbox" id="chkall" onClick="selectall(this.form)"></th>-->
                    <th>订单号</th>
                    <th>买家</th>
                    <th>卖家</th>
                    <th>商品名称</th>
                    <th>订单金额</th>
                    <th>手续费率</th>
                    <th>应结账金额</th>
                    <th>卖家支付宝账号</th>
                    <th>订单状态</th>
                    <th>操作</th>
                </tr>

                <empty name="list">
                    <tr>
                        <td colspan="9">本区域暂无数据显示...</td>
                    </tr>
                    <else />
                    <volist name='list' id='v'>
                        <tr>
                            <td>{$v.order_sn}</td>
                            <td>{$v.buyer_name}</td>
                            <td>{$v.seller_name}</td>
                            <td>{$v.goods_title}</td>
                            <td>{:order_amount($v['order_number'], $v['order_price'])}</td>
                            <td>{$poundage}%</td>
                            <td>{:order_balance($v['order_number'], $v['order_price'])}</td>
                            <td>{$v.seller_alipay}</td>
                            <td>{$v.order_real_status|order_status=###}</td>
                            <td>
                                <a class="balance" order="{$v.order_sn}" href="{:U('Admin/Finance/Balance ', 'sn='.$v['order_sn'])}">打款完成</a>
                                <a href="{:U('Admin/Finance/ProcessOrder', 'sn='.$v['order_sn'])}">处理订单</a>
                            </td>
                        </tr>
                    </volist>
                </empty>


            </table>
    </div>

    <div class="page">{$page}</div>

</div>
<include file="Public/Copyright" />
<script type="text/javascript">
    $('.balance').click(function(){
        var sn = $(this).attr('order');
        if(!confirm('请核对订单号：【' + sn + '】是否正确') ){
            return false;
        }
    });
</script>
</body>
</html>
